package com.wenhai.liuyubobobo.imooc.linkedlist;

/**
 * 链表
 *
 * @author wenhai
 * @date   2021/2/20
 */
public class LinkedList<E> {

    private Node<E> head;
    private int     size;

    public int size() {
        return this.size;
    }

    public boolean isEmpty() {
        return this.size == 0;
    }
    private static class Node<E>{
        E element;
        Node<E> next;

        Node() {
            this(null);

        }

        Node(E element) {
            this(element, null);
        }

        Node(E element, Node<E> next) {
            this.element = element;
            this.next = next;
        }

    }
}
